#include "debug.h"
#include "bleuart.h"
#include "gpioledinit.h"
#include "gpioblestateinit.h"
#include "ledconfig.h"
#include "bleuartapplication.h"

uint8_t receiverDataLen = 0;
extern uint8_t BleRxData[20];

int main(void)
{
    NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
    Delay_Init();
    USART_Printf_Init(115200);
    printf("SystemClk:%d\r\n", SystemCoreClock);

    GPIO_LedInit();
    GPIO_BleStateInit();
    Uart_BleInit();

    GetBleConnectState();

    while(1)
    {
        BleReceiverData();
        ReceiverDataParse();
    }
}
